package com.cuckoo.mall.network;

import com.cuckoo.mall.BuildConfig;

/**
 * 作者：wl on 2017/9/21 15:14
 * 邮箱：wanglun@stosz.com
 */
public class Constants {
    /*APP主域名*/
    public final static String APP_HOST;
    public final static boolean IS_DEBUG;
    public final static String APP_HOST_RELEASE = "http://thusapp.stosz.com";
    public final static String APP_HOST_DEBUG = "http://112.95.135.114:8087";

    static {
        String type = BuildConfig.HOST_URL;
        switch (type) {
            case "debug":
                APP_HOST = APP_HOST_DEBUG;
                IS_DEBUG = true;
                break;
            case "release":
                APP_HOST = APP_HOST_RELEASE;
                IS_DEBUG = false;
                break;
            default:
                APP_HOST = APP_HOST_RELEASE;
                IS_DEBUG = false;
                break;
        }
    }

    /*H5*/
    /*首页*/
    public final static String H5_SHARE = APP_HOST + "/share/index.html";
    /*************************业务接口*****************************************/
    /*首页*/
    public final static String FUNCTION_INDEX = "/api/index/index";
    /*登陆*/
    public final static String FUNCTION_LOGIN = "/api/auth/login";
    /*注册*/
    public final static String FUNCTION_REGISTER = "api/auth/register";
    /*第三方登录*/
    public final static String FUNCTION_THRID_PART_LOGIN = "api/auth/facebooklogin";
    /*忘记密码*/
    public final static String FUNCTION_FORGET_PWD = "api/auth/findpassword";
    /*用户信息*/
    public final static String FUNCTION_USER_INFO = "api/user/getuserinfo";
    /*自动登陆*/
    public final static String FUNCTION_AUTO_LOGIN = "api/auth/autologin";
    /*获取所有种类*/
    public final static String FUNCTION_GET_ALL_CATEGORY = "api/product/allcategory";
    /*main种类*/
    public final static String FUNCTION_GET_HOME_CATEGORY = "api/product/maincategory";
    /*获取分类下的商品列表*/
    public final static String FUNCTION_GET_GOODS_BY_CATEGORY = "api/product/subcategoryproduct";
    /*search*/
    public final static String FUNCTION_GET_GOODS_BY_SEARCH = "api/product/searchproduct";
    /*获取HOME商品列表*/
    public final static String FUNCTION_GET_HOME_GOODS_BY_CATEGORY = "api/product/maincategoryproduct";
    /*获取HOME RECOMMON列表*/
    public final static String FUNCTION_GET_HOME_GOODS_RECOMMON = "api/product/recommandproduct";
    /*获取商品详情*/
    public final static String FUNCTION_GET_GOOD_INFO = "api/product/productdetail";
    /*收藏*/
    public final static String FUNCTION_POST_GOOD_ADD_FAVORITE = "api/product/addfavorite";
    /*DEL收藏*/
    public final static String FUNCTION_POST_GOOD_DEL_FAVORITE = "api/product/delfavorite";
    /*收藏LIST*/
    public final static String FUNCTION_POST_GOOD_FAVORITE_LIST = "api/product/favoritelist";
    /*Cart LIST*/
    public final static String FUNCTION_POST_GOOD_CART_LIST = "api/cart/cartlist";
    /*add cart*/
    public final static String FUNCTION_POST_GOOD_ADD_CART = "api/cart/addcartproduct";
    /*DELETE acart*/
    public final static String FUNCTION_POST_GOOD_DELETE_CART = "api/cart/delcartproduct";
    /*set cart  nums*/
    public final static String FUNCTION_POST_GOOD_SET_CART_ITEM_NUMS = "api/cart/setproductnum";
    /*from cart to favorite*/
    public final static String FUNCTION_POST_GOOD_CART_MOVE_FAVORITE = "api/cart/movetofavorite";
    /*订单相关*/
    public final static String FUNCTION_POST_ORDER_CREAT = "api/order/createorder";
    public final static String FUNCTION_POST_ORDER_CREAT_BY_PRODUCT = "api/order/createorderdirect";
    /*货到付款*/
    public final static String FUNCTION_POST_ORDER_SET_COD = "api/pay/codpay";
    /*order lis*/
    public final static String FUNCTION_POST_ORDER_LOAD_LIST = "api/order/orderlist";
    /*delete order*/
    public final static String FUNCTION_POST_ORDER_DELETE = "api/order/delorder";
    /*modify userinfor*/
    public final static String FUNCTION_POST_MODIFY_USER_INFO = "api/user/modifyuserinfo";
    /*Upload headImage*/
    public final static String FUNCTION_POST_MODIFY_HEAD_IMAGE = "api/user/uploaduserimg";
    /*Upload IMAGE-ALL*/
    public final static String FUNCTION_POST_MODIFY_UPLOAD_IMAGE = "api/upload/uploadimg";
    /*UPLOAD INVITECODE*/
    public final static String FUNCTION_POST_INPUT_INVITE_CODE = "api/upload/uploadimg";
    /*CHECK NEW MESSAGE*/
    public final static String FUNCTION_POST_CHECK_NEW_MESSAGE = "api/message/usermsgtips";
    /*MESSAGE ACTIVE LIST*/
    public final static String FUNCTION_POST_MESSAGE_ACTIVE_LIST = "api/message/activities";
    /*MESSAGE ORDER LIST*/
    public final static String FUNCTION_POST_MESSAGE_ORDER_LIST = "api/message/ordermsg";
    /*GOOD DETAILD RECOMMOND LIST*/
    public final static String FUNCTION_POST_ORDER_DELETE_RECOMMND_LIST = "api/product/interproduct";
    /*GOOD DETAILD RECOMMOND LIST*/
    public final static String FUNCTION_POST_GOODS_RECENTLY_LIST = "api/product/recentlyviewed";
    /*get searchResult categories */
    public final static String FUNCTION_POST_GOODS_SEARCH_CATEGORY = "api/product/searchcategorys";

    /*THUS新接口*/
    public final static String FUNCTION_POST_GOODS_GET_LIST_BY_ID = "api/product/productlist";

    public final static String FUNCTION_POST_ORDER_DETAIL = "api/order/orderdetail";
    /*根据邮编获取省 区*/
    public final static String FUNCTION_POST_GET_ADDRESS_BY_CODE = "api/order/region";
    /*获取所有优惠券*/
    public final static String FUNCTION_POST_GET_ALL_TICKET = "api/coupon/listcoupon";
}
